import axios from '../http/htttp.js'
import qs from 'qs'
// 推荐管理
// 渲染列表
export function Recomlist (params) {
  return axios({
    method: 'get',
    params: {
      _gp: 'admin.recommend',
      _mt: 'queryRecommendByType',
      ...params
    }
  })
}
// 创建
export function Recompdate (fromsaq) {
  return axios({
    method: 'get',
    params: {
      _gp: 'admin.recommend',
      _mt: 'addRecommend',
      ...fromsaq
    }
  })
}
// 获取SPU树
export function Recomtree () {
  return axios({
    method: 'get',
    params: {
      _gp: 'admin.goods',
      _mt: 'getSpuBigTree'
    }
  })
}
// 删除
export function Recomdel (fromdef) {
  return axios({
    method: 'post',
    data: qs.stringify({
      _gp: 'admin.recommend',
      _mt: 'deleteRecommend',
      ...fromdef
    })
  })
}
